<%= render Polaris::BaseComponent.new(**system_arguments) do %>
  <div class="Polaris-Navigation__ItemWrapper">
    <div class="Polaris-Navigation__ItemInnerWrapper">
      <%= link_to @url, **link_arguments do %>
        <% if @icon.present? %>
          <div class="Polaris-Navigation__Icon">
            <%= polaris_icon(name: @icon) %>
          </div>
        <% end %>
        <span class="Polaris-Navigation__Text">
          <%= @label %>
        </span>
        <% if @badge.present? %>
          <div class="Polaris-Navigation__Badge">
            <%= polaris_badge { @badge } %>
          </div>
        <% end %>
      <% end %>
      <% if secondary_actions.present? %>
        <div class="Polaris-Navigation__SecondaryActions">
          <% secondary_actions.each do |secondary_action| %>
            <%= secondary_action %>
          <% end %>
        </div>
      <% end %>
    </div>
  </div>
  <% if sub_items.present? %>
    <div class="Polaris-Navigation__SecondaryNavigation Polaris-Navigation--isExpanded">
      <div class="Polaris-Collapsible" style="max-height: none; overflow: visible;">
        <ul class="Polaris-Navigation__List">
          <% sub_items.each do |sub_item| %>
            <%= sub_item %>
          <% end %>
        </ul>
      </div>
    </div>
  <% end %>
<% end %>
